//
//  NetworkModule.m
//  AFNetworking
//
//  Created by 胡锦涛 on 2021/1/6.
//

#import "NetworkModule.h"
#import "HKLibBaseHeader.h"
#import "HKRequestConfig.h"
// 是否是上线或调试模式  1 上线模式 0 调试模式
#define Release 1
@implementation NetworkModule
+ (void)load {
    BFRegister(LibNetworkService);
}

#pragma mark - BifrostModuleProtocol
+ (instancetype)sharedInstance {
    static NetworkModule *instance = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        instance = [[self alloc] init];
    });
    return instance;
}

- (void)setup {
    
}
//TODO:通过此方法设置Module执行的优先级
+ (NSUInteger)priority {
    return BifrostModuleDefaultPriority; //higher priority than other modules
}

+ (BOOL)setupModuleSynchronously {
    return YES;
}

#pragma mark - UIApplicationDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    //Netwotk初始化
    [HKRequestConfig setupPublicParameters];
    return YES;
}
@end
